Artificial intelligence inferred microstructural properties from voltage–capacity curves

The quantification of microstructural properties to optimize battery design and performance, to maintain product quality, or to track the degradation of LIBs remains expensive and slow when performed through currently used characterization approaches. In this paper, a convolution neural network-based deep learning approach (CNN) is reported to infer electrode microstructural properties from the inexpensive, easy to measure cell voltage versus capacity data. The developed framework combines two CNN models to balance the bias and variance of the overall predictions. As an example application, the method was demonstrated against porous electrode theory-generated voltage versus capacity plots. For the graphite|LiMn\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$_2$$\end{document}2O\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$_4$$\end{document}4 chemistry, each voltage curve was parameterized as a function of the cathode microstructure tortuosity and area density, delivering CNN predictions of Bruggeman’s exponent and shape factor with 0.97 \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$R^2$$\end{document}R2 score within 2 s each, enabling to distinguish between different types of particle morphologies, anisotropies, and particle alignments. The developed neural network model can readily accelerate the processing-properties-performance and degradation characteristics of the existing and emerging LIB chemistries.

In spite of the importance of the microstructural properties of LIBs and their impact on the associated performance, degradation, and cost, to the best of the authors' knowledge, the quantitative estimation of battery properties remains expensive, slow, and difficult to measure. Experimentally, battery microstructural parameters are currently inferred from reconstructing tomographic images 5,7,10,14,15,[17][18][19][20][21][22][23][24][25] . For example, Shearing et al. 17 highlighted microstructural heterogeneities through X-ray tomographic imaging, by considering different volume sizes of an electrode sample and found that larger volumes are more representative of the entire sample. Ebner www.nature.com/scientificreports/ et al. 5 determined the particle size distribution in LiNi 1/3 Mn 1/3 Co 1/3 O 2 , NMC, electrodes and quantified porosity due to composition of additives and compaction pressure during manufacturing and found that the discharge capacity at high C-rates was unaffected by the compaction pressure but increased with additives. Chung et al. 10 calculated tortuosity using tomographic experimental data 5 , and computer generated electrodes to show the particle size distribution and packing affect on the tortuosity and area density. In that study, experimental electrodes displayed a 15% higher tortuosity than computer generated electrodes, demonstrating the importance of establishing processing-microstructural properties correlations of LIB electrodes. Ebner et al. 7 used NMC, graphite, and LiCoO 2 , LCO, electrodes with different particle shapes to demonstrate for the first time the critical effect that morphological anisotropy has on tortuosity. A factor of three increase was found for through-thickness versus in-plane tortuosity for the electrodes. Müller et al. 24 analyzed porosity, particle size distribution, tortuosity, and area density of four commercial graphite electrodes and found that the local ratio of porosity and tortuosity induced localized voltage drops in the electrode potential during charging. Pietsch et al. 25 estimated the uncertainty in determining microstructural parameters and found variabilities as high as 200% for low porosity electrodes, demonstrating their importance in defining a high quality electrode layer.
Although tomography experiments are effective in determining the microstructural parameters, they require an immense economic and computational effort to process and prepare the electrode layers, image the resultant samples, and post process the resultant images 14,19,21,26 . In particular, tortuosity estimation requires additional lengthy calculations on the reconstructed images 10,14,22,27,28 . Other experimental techniques to infer tortuosity include AC impedance-based methods, the polarization interrupt method, e.g., see Thorat et al. 29 , where the tortuosity is determined from the effective chemical diffusivity, and the blocking electrolyte method, e.g., see Landesfeind et al. 30 , where the tortuosity is determined from the effective electrical conductivity. Pouraghajan et al. 26 compared these methods and proposed a generalized impedance based model. These methods require experimental processing of the electrode sample under investigation and some of them require further fitting of electrochemical models to data 31 . Overall, existing non-destructive microstructural quality battery characterization approaches seem impractical to be run jointly and on-the-fly with the production line.
In contrast, machine learning, ML, techniques have been applied to infer multiple aspects of battery technology 32 , including the state of health, SOH, where the aim is to estimate the remaining useful life of the battery, RUL, and optimize battery operating conditions 33,34 . ML models for batteries include regression based methods 35,36 , support vector machines, SVMs 37 , Markov chain and Monte Carlo methods 33,34,[38][39][40][41][42] . Recently, neural network based approaches have been gaining importance to monitor SOH and RUL in real time 34,42 . Zhang et al. 43 used long short-term memory recurrent neural networks, RNN, to predict the RUL by learning the long term dependencies in degradation data. Typically, RNN and their variants have been used to predict SOH and RUL [43][44][45][46][47][48] , wherein they are trained against cell voltage, current, and temperature 34,34,35,37,43,44 . In addition, charge capacity has been estimated through regression models 49,50 . Specifically, the state of charge, SOC, has been estimated by using deep learning methods and establishing correlations between voltage, current, temperature, power, and energy of the LIB during voltage discharge [51][52][53][54][55][56][57][58] .
ML techniques have also been employed in battery materials discovery [59][60][61][62] . Techniques such as regression and neural networks are used to predict material properties such as electrical conductivity and reaction rates [63][64][65] .
Sendek et al. 60,66 , implemented a regression model to screen potential lithium ion conducting solid state electrolyte materials, while Jalem et al. 67 , implemented a neural network. Ahmad et al. 68 , trained a graph convolutional neural network, CNN, to screen for electrolyte materials that suppress lithium dendrite growth. Joshi et al. 69 , used a neural network, SVM, and regression analysis to predict the open circuit voltage of electrode materials. Jiang et al. 70 , developed a ML model to determine the statistics of NMC electrode particle and binder detachment based on the X-ray tomography data. Badmos et al. 71 , implemented deep learning and CNN to detect defects in LIBs for quality assessment. In all these cases, data generation and availability are among some of the major concerns for ML modeling in LIB technology 32,72 .
Currently, the emergence of ML-based tools has focused on estimating the electrochemical state, the degree of degradation, or the prediction of new materials. In contrast, in this paper, a convolutional-dense hybrid neural network-based model has been developed to infer from experimental voltage versus capacity data, the microstructural properties that determine battery performance characteristics within a few seconds, instead of hours or days, by using what would currently be considered expensive, destructive, and slow characterization techniques. This sets the stage to accelerate the processing-properties-performance and degradation characteristics, of the existing and emerging chemistries. Figure 1 shows the proposed neural network combined with a convolutional and dense layers approach. Here, an image containing color-coded normalized voltage curves, each color corresponding to a different current density, and the associated energy density, E, and power density, P, are used as inputs. At the input layer, the convolutional kernels extract higher level representations. A down-sampling max-pooling layer follows each convolutional block, reducing the input size for the next layer, achieving translation invariance and preserving the important information, see Table 1.

Methodology
Because the aim is to predict α and S with the same neural network, two challenges are noted: (1) the need to minimize the bias towards S during training, where target ranges are drastically different (α : 0-5; S: 0-40); and (2) the tendency of neural network to favor higher S-values for mean squared error (L 2 loss). Therefore, two identical CNN models with customized loss functions were combined.
Two CNN models were developed, the first one is referred herein as the L w -model, and uses a weighed mean squared error, L w , which is the loss function: www.nature.com/scientificreports/ y i is the true value and ŷ i is the model prediction for the ith voltage versus capacity curve and n is the total number of data points. W α and W S control the importance of each quantity during model prediction.
(3) Figure 1. Convolutional neural network architecture to infer microstructural battery parameters. The CNN is comprised of convolution blocks and fully connected layers, which takes two types of input at different stages. The model takes the color-encoded voltage versus capacity curves as the main input (each color corresponding to a current density), energy density, E, and power density, P, as the second input. Each convolution block has two convolutional layers, followed by a pooling layer. A ReLU activation function is placed after each convolutional layer and hidden dense layer. For each data point, the image with voltage curves are fed into the network. For each curve, E and P are taken into the following fully connected layers, along with the higher-level representation of the input image. The output of this network has two components, the Bruggeman exponent, α , and the area density shape factor, S. See text for details.
Extra input (E, P) and flattening ReLU - www.nature.com/scientificreports/ The second network corresponds to the same architecture trained with another loss function, defined herein as the L M -model, to reach a uniform relative error for the entire target span and to emphasize the lower α and S values, where: To evaluate the performance of the models, the coefficient of determination, R 2 , was used to account for the proportion of the true target variance: Here, f i represents the predicted values from trained neural network, y i , represents the true values in the pre-processed dataset, and ȳ is the sample mean of y i . L s measures the averaged relative error and is defined as: to represent the percentage deviation between the predicted and the true values. The residuals were normalized against their mean and standard deviation to fairly compare the model performance to predict α and S. A combination of these two models was implemented to balance the bias and variance.

Numerical implementation
Voltage vs. capacity curves were generated using dualfoil.py, an open source python software, developed by Robinson and García 73 , which python-wraps the dualfoil legacy fortran code made publically available by Doyle et al. 74 . Different combinations of the Bruggeman exponents and shape factors of the cathode were sampled while the values corresponding to other design adjustable and material parameters were kept constant. The Bruggeman exponent was discretized into intervals of 0.1, ranging from 0 to 10, which correspond to experimentally observed ranges 10,11 . The shape factor was discretized into intervals of 1, ranging from 0 to 40, also in agreement with experimentally observed particle morphologies 6,10,16 . The discharge currents were varied from 1.75 A m −2 to 122.5 A m −2 , for each combination of shape factor and Bruggeman exponent, resulting in a total of 15,600 simulations. 1500 simulations that did not converge were discarded without affecting the resolution of the dataset, see Deva and coworkers for details 16 74,75 thus, its veracity would be limited at higher current densities for all cell chemistries 76 . During data generation, dualfoil.py simulation time was ∼20s−300 s per current density curve for a given combination of Bruggeman exponent and shape factor.
The proposed neural network architecture was implemented in Tensorflow, trained on a Tesla P100 GPU on 12 hours of wall time. Tenfold cross validation was used to report the model performance where, in each fold, the entire dataset was split randomly into ten equal parts: the network was trained on nine parts and evaluated on the remaining part. In order to assess the validity of the predicted α and S, these values were used as input into dualfoil.py , to predict the associated voltage versus capacity curves. The final compound neural network combined both the L w -model and L M -model by reporting the predicted values of greater performance for each model, given their range of validity.

Results and discussion
As an example application, a LiMn 2 O 4 , and graphite electrode cell was used to train the CNN. In general, the analysis and data curation process requires the sampling of a statistically representative section of the microstructural parameter space and the corresponding voltage vs capacity response, given an imposed set of current densities. This process can be readily performed by carefully fabricating porous electrode microstructures of tailored tortuosity and area density 7,16,17,20 , and by filling the microstructural parameter gaps by using well developed physics-based microstructural models. In the case of LIBs based on porous electrode layers, the microstructural response has been well described in terms of the well established porous electrode theory model, as pioneered by Newman et al. 77 , Doyle et al. 74,75 , and developed by a well-established community, e.g., [78][79][80][81] . Specifically, through the use of dualfoil.py, the space of microstructural parameters can be readily explored, e.g., see Deva et al. 16 . Figure 2 directly compares the expected or true α and S values against the neural network predictions, showing a 99% model explained variance. The L M -model delivers a 2.95% error for α and R 2 > 0.99 . The L w -model resulted in higher L s values because the L w -model is sensitive to large errors from high S and α values. Figure 2a, b shows that for large α values, the points lie more close around the identity line, while for low α and S values, the points deviate from the line. Similarly, Fig. 2c, d show that there is at least 97% of the variance the trained model can explain in the true distribution.
In Fig. 3, each inset shows the normalized residual, its density, and the corresponding normal quantile-quantile (Q-Q) plot for α and S of the aggregated values of the tenfold cross-validation for both L w -and L M -models. The models deliver residuals with a Gaussian distribution supporting an unbiased ML model. The Q-Q plots www.nature.com/scientificreports/ for the L w -model suggest the residuals display near symmetric Gaussian distributions with a slight skew to the right for predicting α and S. In contrast, the mean of residuals from the L M -model for both α and S was closer to zero and their Q-Q plots indicate heavy tails compared to the Gaussian distributions with the same mean and variance. Figure 4 shows the performance of both L w -and L M -models for different output ranges. Figure 4a shows that the L M -model delivers a better prediction for α < 6 , the physically realistic range of values for porous electrode LIBs. For α > 6 , both models deliver a similar performance with the L w -model returning a lower L s value.
In contrast, Fig. 4b shows that the L w -model delivered a lower L s value across the entirety of the trained ranges, and thus was chosen as the model to make predictions for S. Both L w -and L M -models perform well on predicting α (see Eq. 2) and S (see Eq. 1), but the L w -model under-predicts, suggesting it has a higher bias compared to the L M -model. However, the L M -model delivered larger residuals, indicating higher variance. Therefore, a combined model that returns the best output from each L w -or L M -model, as they sample different bins and different accuracies will enable a better prediction and a larger winning margin. Figure 5 compares the cell potential versus capacity electrochemical behavior that results from different battery microstructures against the combined model. Specifically, inset (a) compares the experimental behavior, as reported by Doyle and Newman 74 , against their dualfoil prediction using the traditional spherical limit approximation, i.e., α = 1/2 and S = 3 , and the values predicted by the CNN by using the experimental voltage response as input. Not only the CNN-generated microstructural parameters provide a better match to the experimental response ( ∼2.2% error of the spherical limit versus ∼0.8% for the CNN-base prediction at low current densities), but the graphically-inferred values, α = 2.37 and S = 11.12 , demonstrate that the shape of the particles are morphologically anisotropic and display a great degree of surface area, as one would expect in a real microstructure. Further, while the CNN prediction is highly accurate, particularly for low current densities, the simulation demonstrates that at high current densities, polarization losses dominate the response of the cell, regardless of the particle morphology. The deviations between model and experiment are a result of model limitations unable to capture the particle-particle effects that result at high current densities, e.g., see Battiato et al. 76 .
For dual porous battery architectures, e.g., 82 , Fig. 5b, c highlight the effect of area density on the predicted electrochemical response, showing that the CNN can easily distinguish between high and low quality designs. In particular, inset (b) shows that the low power density design is result of a subpar area density delivered by the dual porous microstructure. In contrast, inset (c) shows that a dual porous, bicontinuous architecture cannot deliver very high power densities, but can out perform the traditional layered porous design.
For traditional single porosity, electrode designs conformed of highly aligned (textured) platelets (MRD > 20), with morphological anisotropy, c/a ∼ 1/10, but poor area density, inset (d) shows that even though the CNN captures the relevant features controlling the microstructural electrochemical behavior, there are some instances where differences between the expected and predicted ( α, S ) pairs can lead to a 25% difference in the www.nature.com/scientificreports/ overall predicted charge capacity. In this specific case, the difference is a result of a 48% difference in the S-value. However, for the same microstructural properties, an increase in area density of 20× delivers a match by the CNN-model that is virtually indistinguishable from the expected behavior, see inset (e). Further, insets (d) and (e) demonstrate the possibility of inferring from voltage measurements in porous electrodes the same particle morphology-induced tortuosity but a widely different electrochemically active area density, enabling the possibility of tracking the area density losses that result from degradation, such as those resulting from decrepitation 83 or SEI growth 84 . Further, the effects of different powder qualities, e.g., different particle morphological anisotropies and their processing-induced alignment 7 , and the corresponding area densities, can be easily inferred through the proposed CNN-model, enabling the possibility to distinguish even subtle differences, compare insets (e) and (f), whose quantification is critical for the advanced fabrication of energy storage technology.

Conclusion
A convolution neural network-based deep learning model was presented to infer porous electrode microstructure properties from the macroscopic voltage behavior, specifically, Bruggeman's exponent, α , and shape factor, S, by starting from six voltage versus charge capacity response curves, each for a different current density as well as the corresponding power and energy density. Two models were trained using adjusted L w and L M loss functions, and were combined to produce a combined model that accurately predicts microstructure properties. The developed CNN-framework allows to distinguish between different types of particle morphologies, anisotropies, and particle alignments, as well as the effects on the area density. All of these microstructural characteristics are a result of processing, including powder selection, layer compaction, and calendaring, and are www.nature.com/scientificreports/ key to specify the quality of the processing operation. As presented, the developed methodology can be readily incorporated into the battery production process as a step to track the microstructural quality of the developed product and assert control on the developed energy storage technology. Further, the developed CNN-model can be readily used as a way to estimate the amount of active material left as a result of the multiple cycle-induced microstructural changes on the voltage versus charge capacity response as a result of the electrochemically active area density loss and increase of the electrode impedance. Finally, while we used computer-generated data to demonstrate the ability of the CNN model to predict battery microstructural parameters from voltage versus charge capacity curves, the methodology can be easily implemented by using a statistically representative, carefully fabricated set of battery architectures that span a physically realistic range of processing parameters, and can be readily extended to infer other relevant battery design parameters, such as layer thickness, particle size, lithium diffusivities, electrical conductivities, etc. The availability of curated, public databases that have carefully labeled the microstructural parameters, as well as voltage and capacity response will be key to apply this formulation to the generality of battery chemistries and designs. The Jupyter notebook associated to the model can be accessed on Google Colab. The source code can be accessed at microbattAI.